package com.zhong.controller;

import com.zhong.po.Emp;
import com.zhong.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController  //@Controller + @ResponseBody
@RequestMapping("/api/emp")
public class EmpController {

    @Autowired
    private EmpService empService;


    @RequestMapping("/insertSelective")
    public String insertSelective(Emp emp){
        return empService.insertSelective(emp);
    }

    @RequestMapping("/deleteByPrimaryKey")
    public String deleteByPrimaryKey(int id){
        return empService.deleteByPrimaryKey(id);
    }

}
